﻿<%@ Page Language="C#" MasterPageFile="~/adm-Master.Master" AutoEventWireup="true" CodeBehind="Customer.aspx.cs" Inherits="BookStore.admin.Customer" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="PageName">Customer Manager</div>
    
<asp:Panel ID="pnView" runat="server">

<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddT" runat="server" 
                onclick="lbtAddT_Click">Add new</asp:LinkButton>
        </li> 
        <li> 
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshT" runat="server" OnClick="lbtRefreshB_Click">Refesh</asp:LinkButton></li> 
        <li> 
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Back</a> 
        </li>
    </ul>
</div>
    <asp:GridView ID="gvCustomer" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BorderWidth="1px" Width="100%" 
        onrowdeleting="gvCustomer_RowDeleting" 
        onselectedindexchanging="gvCustomer_SelectedIndexChanging" 
        onpageindexchanging="gvCustomer_PageIndexChanging">
        <Columns>
            <asp:BoundField DataField="customerID" HeaderText="customerID" />
            <asp:BoundField DataField="customerName" HeaderText="customerName" />
            <asp:BoundField DataField="email" HeaderText="Email" />
            <asp:BoundField HeaderText="Password" />
            <asp:BoundField DataField="address" HeaderText="address" />
            <asp:BoundField DataField="phone" HeaderText="Phone" />
            <asp:CommandField ShowDeleteButton="True" />
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddB" runat="server" OnClick="lbtAddT_Click">Add new</asp:LinkButton>
        </li> 
        <li>
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshB" runat="server" 
                onclick="lbtRefreshB_Click" >Refesh</asp:LinkButton>
        </li> 
        <li>
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">
            Back</a> </li> 
    </ul>
</div>
</asp:Panel>
<asp:Panel ID="pnUpdate" runat="server" Visible="False">
<table class="TableUpdate" border="1">
    <tr> 
        <td class="Control" colspan="2">
            <ul>
                <li>
                    <asp:LinkButton CssClass="uback" ID="lbtBackT" runat="server" 
                        onclick="lbtBackT_Click" CausesValidation="False">Back</asp:LinkButton>
                </li> 
            </ul>
        </td> 
    </tr>
    <tr> 
    <th> 
        &nbsp;</th>
    <td>
       <asp:TextBox ID="txtCustomerID" runat="server" CssClass="Text" Visible="False"></asp:TextBox>
    </td>
     </tr>
    <tr> 
       <th> 
            <asp:Label ID="lblCustomerName" runat="server" Text="CustomerName :"></asp:Label>
       </th>
       <td>
            <asp:TextBox ID="txtCustomerName" runat="server" CssClass="Text"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtCustomerName" ErrorMessage="not blank"></asp:RequiredFieldValidator>
       </td>
     </tr>
     <tr> 
        <th> 
            <asp:Label ID="lblemail" runat="server" Text="Email :"></asp:Label>
        </th>
        <td>
            <asp:TextBox ID="txtEmail" runat="server" CssClass="Text"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtEmail" ErrorMessage="not blank"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtEmail" ErrorMessage="email is invalid" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        </td>
     </tr>
     <tr> 
        <th class="style1"> 
            <asp:Label ID="lblPassword" runat="server" Text="Password :"></asp:Label>
        </th>
        <td class="style1">
            <asp:TextBox ID="txtPassword" runat="server" CssClass="Text" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtPassword" ErrorMessage="not blank"></asp:RequiredFieldValidator>
        </td>
      </tr>
      <tr> 
         <th> 
             <asp:Label ID="lblAddress" runat="server" Text="Address :"></asp:Label>
         </th>
         <td>
             <asp:TextBox ID="txtAddress" runat="server" CssClass="Text"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                 ControlToValidate="txtAddress" ErrorMessage="not blank"></asp:RequiredFieldValidator>
         </td>
      </tr>
      <tr> 
         <th> 
             <asp:Label ID="lblphone" runat="server" Text="Phone :"></asp:Label>
        </th>
        <td>
            <asp:TextBox ID="txtPhone" runat="server" CssClass="Text"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtPhone" ErrorMessage="not blank"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ControlToValidate="txtPhone" ErrorMessage="phone is invalid" 
                ValidationExpression="^0[0-9]{8,10}$"></asp:RegularExpressionValidator>
        </td>
     </tr>
     <tr> 
         <td class="Control" colspan="2">
             <ul>
                 <li>

                
                 <asp:LinkButton CssClass="uupdate" ID="LinkButton1" runat="server" 
                         onclick="lbtUpdateT_Click">Save</asp:LinkButton></li> <li> 

                 <asp:LinkButton CssClass="uback" ID="lbtBack" runat="server" 
                         CausesValidation="False" onclick="lbtBackT_Click">Back</asp:LinkButton>
                 </li> 
             </ul>
         </td> 
     </tr>
</table>
</asp:Panel>
</asp:Content>
